<include file="public@header"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>

</head>
<body>
<div class="wrap js-check-wrap">

    <form action="{:url('user/adminIndex/setingpost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <input  type="hidden" value="{$user.id}" name="id" />

                    <tr>
                        <th class="col-md-1">姓名<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text"  name="name" value="{$user.name}"  placeholder="请输入标题"/>
                        </td>
                    </tr>

                    <tr>
                        <th class="col-md-1">电话<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text"  name="mobile" value="{$user.mobile}"  placeholder="请输入标题"/>
                        </td>
                    </tr>

                    <tr>
                        <th class="col-md-1">推荐人id<span class="form-required">*</span></th>
                        <td>
                            <input class="form-control" type="text" value="{$user.agentid}" name="agentid"  placeholder="请输入标题"/>
                        </td>
                    </tr>


                    <tr>
                        <th class="col-md-1">类型<span class="form-required">*</span></th>
                        <td>
                            <select class="form-control" name="level"  >
                                <option value="0" <if condition="$user['level']==0">selected </if> >普通</option>
                                <option value="1" <if condition="$user['level']==1">selected </if> >加盟商</option>
                                <option value="2" <if condition="$user['level']==2">selected </if> >负责人</option>
                            </select>
                        </td>
                    </tr>


                    <tr>
                        <th class="col-md-1">库房<span class="form-required">*</span></th>
                        <td>
                            <select class="form-control" name="kf"  >
                                <option value="0" <if condition="$user['kf']==0">selected </if> >普通</option>
                                <option value="1" <if condition="$user['kf']==1">selected </if> >库房</option>
                            </select>
                        </td>
                    </tr>

                    <tr>
                        <th class="col-md-1">团队<span class="form-required">*</span></th>
                        <td>
                            <select class="form-control" name="team_id"  >

                                <option value="0" <if condition="$user['team_id']==0">selected </if> >无</option>
                                <volist name="hezuo" id="hzs">
                                    <option value="{$hzs.id}" <if condition="$user['team_id']==$hzs['id']">selected </if> >{$hzs.title}</option>

                                </volist>
                            </select>
                        </td>
                    </tr>

                </table>

                <hook name="portal_admin_article_edit_view_main"/>
                <div class="form-group">
                    <div class="col-sm-offset-4 col-sm-5">
                        <button type="submit" onclick="claose()" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    $(function () {

        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('content');
        try {
            editorcontent.sync();
        } catch (err) {
        }

        $('.btn-cancel-thumbnail').click(function () {
            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#thumbnail').val('');
        });

    });


    function  claose(){

        setTimeout(function (){

            parent.location.reload(true);//刷新父级页面
            var index = parent.layer.getFrameIndex(window.name);获取当前弹窗的Id
            parent.layer.close(index);关闭
        },1200)


    }

</script>
</body>
</html>
